/**
 * 
 */
package net.cloudcodex.client.util;

/**
 * @author Daniel
 * 
 */
public class ClientUtils {

	public static boolean isBlankOrNull(String text) {
		if (text == null) {
			return true;
		} else {
			if (text.trim().equals("")) {
				return true;
			}
		}
		return false;
	}
	
	public static String getChangedText(String newText, String oldText) {
		if (oldText != null){
			if(!oldText.equals(newText)){
				return newText ;
			}
		}else{
			if(!ClientUtils.isBlankOrNull(newText)){
				return newText;
			}
		}
		return null;
	}
}
